#ifndef _COMMON_H_
#define _COMMON_H_

typedef unsigned short imgpel;
#define PI 3.1415926
extern imgpel orig_pic[352][288];

static inline int imin(int a, int b)
{
  return ((a) < (b)) ? (a) : (b);
}

static inline int imax(int a, int b)
{
  return ((a) > (b)) ? (a) : (b);
}

static inline int iClip3(int low, int high, int x)
{
  x = imax(x, low);
  x = imin(x, high);

  return x;
}


#endif // _COMMON_H_